#!/usr/bin/env bash

set -euo pipefail
VERSION=v1.18.26
SHASUM=cec72cde1cf36eb35cd8326245d23af0b6791fab68337c2953e2ca2a40af2c50

echo "Installing solana@${VERSION}"
curl -sSfL https://release.anza.xyz/$VERSION/install --output install_solana.sh \
    && echo "Checking shasum of Solana install script." \
    && echo "${SHASUM} install_solana.sh" | sha256sum --check
chmod +x install_solana.sh
sh -c ./install_solana.sh
